
let databus = new oni.DataBus()
const screenWidth  = window.innerWidth
const screenHeight = window.innerHeight

const BG_IMG_SRC = 'assets/images/bg.jpg'
const BG_WIDTH     = 512
const BG_HEIGHT    = 512

/**
 * 游戏背景类
 */
export default class BackGround {
  constructor() {
    this.gamebg = new oni.Sprite('assets/images/gamebg.png', 793, 891, 0,0)
    this.scorebg = new oni.Sprite('assets/images/scorebg.png', 222, 89, screenWidth/2-111,10)
   
    databus.ui.push(this.gamebg)
    databus.ui.push(this.scorebg)
 
    this.timebg = new oni.Sprite('assets/images/loading/timebg.png', 216, 12, screenWidth / 2 - 108, 115)
    databus.ui.push(this.timebg)
    this.table = new oni.Sprite('assets/images/table.png', 350, 350, screenWidth / 2 - 175, screenHeight/2- 195)
    databus.ui.push(this.table)
   
  }
}
